package com.epfresh.supplier.entity;

/**
 * Created by Administrator on 2016/5/10.
 */
public class Bank {


    private String bankName;
    private String state;
    /**
     * bankId :
     * bankBranchName :
     * cardNo :
     * cardholderName :
     * licenseImgId :
     * licenseImgUrl :
     */

    private String bankId;
    private String bankBranchName;
    private String cardNo;
    private String cardholderName;
    private String licenseImgId;
    private String licenseImgUrl;
    //1,个人，2，企业
    private String type;
    String merchantId;

    public String getMerchantId() {
        return merchantId;
    }

    public void setMerchantId(String merchantId) {
        this.merchantId = merchantId;
    }

    public void setBankId(String bankId) {
        this.bankId = bankId;
    }

    public void setBankBranchName(String bankBranchName) {
        this.bankBranchName = bankBranchName;
    }

    public void setCardNo(String cardNo) {
        this.cardNo = cardNo;
    }

    public void setCardholderName(String cardholderName) {
        this.cardholderName = cardholderName;
    }

    public void setLicenseImgId(String licenseImgId) {
        this.licenseImgId = licenseImgId;
    }

    public void setLicenseImgUrl(String licenseImgUrl) {
        this.licenseImgUrl = licenseImgUrl;
    }

    public String getBankId() {
        return bankId;
    }

    public String getBankBranchName() {
        return bankBranchName;
    }

    public String getCardNo() {
        return cardNo;
    }

    public String getHideCardNo(){
        if (cardNo != null && cardNo.length() > 8){

            String start = cardNo.substring(0, 4);

            String end = cardNo.substring(cardNo.length() -4,cardNo.length());
            return start + " **** **** " + end;

/*            String flag="";
            for(int i=0;i<cardNo.length()-8;i++){
                flag+="*";
            }

            return start + " "+flag+" " + end;*/
        }
        if (cardNo != null){
            return cardNo;
        }
        return  "";
    }

    public String getCardholderName() {
        return cardholderName;
    }

    public String getLicenseImgId() {
        return licenseImgId;
    }

    public String getLicenseImgUrl() {
        return licenseImgUrl;
    }


    public String getBankName() {
        return bankName;
    }

    public void setBankName(String bankName) {
        this.bankName = bankName;
    }

    public String getState() {
        return state;
    }

    public void setState(String state) {
        this.state = state;
    }

    public String getType() {
        return type;
    }

    public void setType(String type) {
        this.type = type;
    }

    @Override
    public String toString() {
        return bankName;
    }
}
